/**
 * Copyright &copy; 2018-2018 <a href="#">聚成科技</a> All rights reserved.
 */
package com.jckj.core.vos;

import com.jckj.core.validator.groups.Add;
import com.jckj.core.validator.groups.Delete;
import com.jckj.core.validator.groups.Edit;
import com.jckj.core.validator.groups.View;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * <p>
 *     增加编号
 * </p>
 *
 * @author 刘志远
 * @date 18-2-2
 */
public class OfficeUserVo {

    @NotNull(message="请选择操作的用户", groups = {Delete.class, Edit.class, View.class})
    private String userId;

    @NotNull(message="请输入用户姓名", groups = {Edit.class, Add.class})
    @Length(min=2, max = 20, message = "用户姓名长度为2～20个字符")
    private String username;
    @NotNull(message="请输入登录名", groups = {Edit.class, Add.class})
    @Length(min=4, max = 20, message = "登录名长度为4～20个字符")
    private String loginName;
    @NotNull(message="请输入手机号码", groups = {Edit.class, Add.class})
    @Pattern(regexp="^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$", message = "请输入正确的手机号码")
    private String phone;

    @NotNull(message="请选择所属科室", groups = {Edit.class, Add.class})
    @Length(min=32, max = 32, message = "请选择所属科室")
    private String officeId;

    private String updateBy;

    private Date updateTime;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getOfficeId() {
        return officeId;
    }

    public void setOfficeId(String officeId) {
        this.officeId = officeId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
